<section class="horizontal-form container-fluid">
  <h2>{{t "editStack.title"}}</h2>
  <label class="acc-label pb-5">{{t "editStack.name.label"}}</label>
  {{input type="text" value=primaryResource.name classNames="form-control" placeholder=(t "editStack.name.placeholder") disabled=true}}

  <label class="pt-20 pb-5">{{t "editStack.description.label"}}</label>
  {{textarea value=primaryResource.description classNames="form-control no-resize" rows="5" placeholder=(t "editStack.description.placeholder")}}

  <label class="pt-20 pb-5">{{t "editStack.project.label"}}</label>
  {{new-select
    classNames="form-control"
    optionValuePath="id"
    optionLabelPath="displayName"
    content=allProjects
    value=primaryResource.projectId
    prompt="editStack.project.prompt"
    localizedPrompt=true
  }}


  <div class="row mt-20">
    {{#accordion-list showExpandAll=false as | al expandFn | }}
      {{#if (and primaryResource.project.resourceQuota (not switchingProject))}}
        {{#accordion-list-item
              title=(t "editStack.resourceQuota.title")
              detail=(t "editStack.resourceQuota.detail")
              expandAll=al.expandAll
              expand=(action expandFn)
              expandOnInit=true
        }}
          {{namespace-resource-quota
              editing=(or editing isNew)
              isNew=false
              expanded=expanded
              limit=primaryResource.resourceQuota.limit
              projectLimit=projectLimit
              usedLimit=projectUsedLimit
              nsDefaultQuota=nsDefaultQuota
              changed=(action "updateNsQuota")
          }}
        {{/accordion-list-item}}
      {{/if}}

      {{#accordion-list-item
          title=(t "projectsPage.containerDefaultLimit.title")
          detail=(t "projectsPage.containerDefaultLimit.detail")
          expandAll=al.expandAll
          expand=(action expandFn)
          expandOnInit=false
      }}
        {{container-default-limit
            editing=(or editing isNew)
            expanded=expanded
            limit=primaryResource.containerDefaultResourceLimit
            changed=(action "updateContainerDefault")
        }}
      {{/accordion-list-item}}
    {{/accordion-list}}
  </div>

</section>

{{top-errors errors=errors}}
{{save-cancel editing=editing save="save" cancel="cancel"}}
